/**
 * NodeIDSorter.java
 * ************************** 
 * @date May 5, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package gossipServices.bootstraping.tman.rankingMethods.rankingComparators;

import gossipServices.bootstraping.tman.rankingMethods.RankingPair;

/**
 * Description: 
 * This class implements the RankingComparator.
 * If applied to a Collection of RankingPair(s) it will
 * sort following the increasing ordering of their NodeID(s). 
 */
public class NodeIDSorter implements RankingComparator {
	
	public NodeIDSorter() {}

	@Override
	public int compare(RankingPair o1, RankingPair o2) {
		return o1.getNode().getNodeID().compareTo(o2.getNode().getNodeID()) ;
	}

}
